<!doctype html>
<html>
  <head>
    <title>HTML Imports Test</title>
    <script src="../../tools/test/htmltest.js"></script>
    <script src="../../node_modules/chai/chai.js"></script>
    <script src="../../custom-elements.js"></script>
  </head>
  <body>
    <element name="x-foo">
      <script>
        (this !== window) && this.register({
          prototype: Object.create(Object.prototype, {
            readyCallback: {
              value: function() {
                this.readied = true;
              }
            }
          })
        });
      </script>
    </element>
    <script>
      addEventListener('WebComponentsReady', function() {
        var xfoo = document.createElement('x-foo');
        chai.assert.isTrue(xfoo.readied);
        done();
      });
    </script>
  </body>
</html>
